package com.farm.farming.dao;

import com.farm.farming.pojo.Cust_permission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Transactional
@Repository
public interface Cust_permissionMapper extends JpaRepository<Cust_permission,Integer>, JpaSpecificationExecutor<Cust_permission> {

    @Query(value = "select count(0) from t_cust_role_permission where permission_id=?1",nativeQuery = true)
    public int selectTrolePermissionByPermissionId(Integer id);


}
